﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using EntityObjects;
using BAL.Controller;

namespace PresentationLayer.View.DepartmentEmployee
{
    public partial class Notification_Employee : System.Web.UI.UserControl
    {
         Employee  employee = new Employee();
       NotificationController nc =new NotificationController();
        Requisition req=new Requisition();

        protected void Page_Load(object sender, EventArgs e)
        {
            
                 try
            {
                if (!IsPostBack)
                {
                    Bind();
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('there is no requisition available for Approvel  or data base error!');</script>");

            }
        }
          protected void Bind()
        {  
            
             employee = (Employee)Session["CurrentUser"];
          string emp=  employee .EmpId;
            req = nc.getLastDataofGivenEmployee(emp);
            string status = req.Status;
            Noti_Employee.Text = "Requisition Status: " + status;
          
          
        }

        }

        }
    
